package com.base.system.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.base.system.jpa.entity.JpaUser;
import com.base.system.jpa.entity.JpaUserRole;
import com.base.system.mybatisPlus.entity.MybatisUser;
import com.base.system.web.vm.UserVm;
import org.springframework.security.core.userdetails.UserDetailsService;

import java.util.List;

public interface UserService extends UserDetailsService {
    JpaUser findByIdFromJpa(Long id);

    JpaUser save(JpaUser user);

    MybatisUser findByIdFromMybatis(Long id);

    IPage<MybatisUser> page(Page<MybatisUser> page, UserVm vm);

    JpaUser udate(JpaUser user);

    void saveUserRole(List<JpaUserRole> userRoles);

    List<Long> getUserWithRole(Long userId);
}
